﻿using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace HossMvp.Core
{
    public abstract class AbstractViewManager : IViewManager<AbstractView/*, IViewProvider*/>
    {
        public abstract AbstractView Create<T>(params object[] args) where T : AbstractView;

        public abstract void Remove(AbstractView view);

        public abstract IEnumerable<AbstractView> Views { get; protected set; }

        public IPresenter<AbstractModelManager, AbstractViewManager> Presenter { get; set; }

        public ICommand GetCommand(string name)
        {
            var command = this.Presenter.CommandProcessor.GetCommand(name);
            Debug.Assert(command != null, "command != null");
            return command;
       }
    }
}